Skip to content

Create data channels as negotiated in single PC mode (protocol 18) - #1527

Open
cnderrauber wants to merge 4 commits into
mainfrom
jie/negotiated-data-channels
Open

cnderrauber wants to merge 4 commits into
mainfrom
jie/negotiated-data-channels

Conversation

@cnderrauber

Copy link
Copy Markdown
Contributor

Use fixed SCTP stream IDs (100/101/102) for the publisher data channels so the server can send on them without waiting for the client's DCEP OPEN, saving about one RTT of server->client readiness. Falls back to in-band channels when the server protocol is below 18 or it doesn't use single PC.

Use fixed SCTP stream IDs (100/101/102) for the publisher data channels so
the server can send on them without waiting for the client's DCEP OPEN,
saving about one RTT of server->client readiness. Falls back to in-band
channels when the server protocol is below 18 or it doesn't use single PC.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Changeset ✓

This PR includes a changeset covering all affected packages:

Package Bump
livekit minor
livekit-api minor
livekit-capture minor
livekit-ffi minor
livekit-signaling minor

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment thread livekit/src/rtc_engine/rtc_session.rs
Comment thread livekit/src/rtc_engine/rtc_session.rs
Comment thread livekit/src/rtc_engine/rtc_session.rs Outdated
Comment on lines +618 to +619
// The SCTP section is already in the offer, so in-band channels can be
// opened on it without renegotiation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this sounds like magic to me, can you explain how this works for older servers?
a couple of lines down we create the data channels with negotiated: false which makes it sound like we would still need negotiation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my comment was a bit vague.. It means we don't need sdp renegotiation for the newly created data channels. Clarified 0e0a6c3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Comment thread .changeset/negotiated_data_channels.md
cnderrauber and others added 3 commits October 18, 2026 17:11
Co-authored-by: lukasIO <mail@lukasseiler.de>
Co-authored-by: lukasIO <mail@lukasseiler.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants